package com.pn.controller;

import com.pn.entity.Result;
import com.pn.service.StoreService;
import com.pn.vo.StoreCountVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author :LY
 * @Description :
 * @Date :2025/5/17 1:17
 */
@RequestMapping("/statistics")
@RestController
public class StatisticsController {
    //注入StoreService
    @Autowired
    private StoreService storeService;

    //统计仓库库存的url接口/statistics/store-invent
    @RequestMapping("store-invent")
    public Result storeInvent(){
        List<StoreCountVo> storeCountVoList = storeService.queryStoreCount();
        return Result.ok(storeCountVoList);
    }
}
